package com.test.springCloud.mapper;

import com.test.springcloud.pojo.SessionListPojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SessionListMapper {
    int deleteByPrimaryKey(@Param("id")Integer id);

    int insert(SessionListPojo sessionList);

    SessionListPojo selectByPrimaryKey(@Param("id")Integer id);

    List<Integer> selectUserIdByUserId(@Param("id") Integer id);

    List<SessionListPojo> selectByUserId(@Param("id")Integer id);

    Integer selectIdByUser(@Param("fromId")Integer fromId,@Param("toId")Integer toId);


    void addUnReadCount(@Param("userId") Integer userId, @Param("toUserId") Integer toUserId);

    void delUnReadCount(@Param("fromUserId") Integer fromUserId,@Param("toUserId") Integer toUserId);

    void autoDeldata();
}
